package cn.iocoder.yudao.module.agent.job;

import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
import cn.iocoder.yudao.module.agent.service.brokeragerecord.AgentBrokerageRecordService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class AgentBrokerageRecordUnfreezeJob implements JobHandler {

    @Resource
    private AgentBrokerageRecordService agentBrokerageRecordService;

    @Override
    @TenantJob
    public String execute(String param) {
        int count = agentBrokerageRecordService.unfreezeRecord();
        return StrUtil.format("解冻代理佣金 {} 个", count);
    }
}
